package middleware.llvm.value;


/**
 * 分配和管理名称
 *
 * @author 杨凯伟
 * @date 2024/10/30
 */
public class NameAllocator {
    private int count = 0;
    private static final NameAllocator instance = new NameAllocator();

    public static NameAllocator getInstance() {
        return instance;
    }

    public void reset() {
        count = 0;
    }

    public String alloc() {
        count++;
        return Integer.toString(count);
    }
}
